class Owner:
    def __init__(self, restmoney):
        self.restmoney = restmoney

    # @property
    def sendmoney(self):
        print('发红包啦')
        return self.restmoney


class Member(Owner):
    def __init__(self, member1, restmoney):
        super().__init__(restmoney)
        self.member1 = member1

    def getmoney(self):
        lens = len(self.member1)
        moneynumber = self.restmoney//lens
        restmoneynumber = self.restmoney % lens
        i = 0
        while i < lens-1:
            print(f"我是{self.member1[i]},现有{moneynumber}块钱")
            i+=1
            if i==lens-1:
                print(f"我是{self.member1[i]},现有{moneynumber+restmoneynumber}块钱")


if __name__ == '__main__':
    qunzhu=Owner(16)
    rest=qunzhu.sendmoney()
    member122 = ["lili", "lala", "qiaqia", "bombom","haha"]
    chengyuan=Member(member122, rest)
    chengyuan.getmoney()

